<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var score = prompt("请输入小明的期末成绩（0~100）：");
        if (score > 100 || score < 0) {
            alert("请输入正确值");
        } else {
            if (score == 100) {
                alert("宝马，拿去~~");
            } else if (score >= 80) {
                alert("奖励一台iphone14");
            } else if (score >= 60) {
                alert("奖励一本参考书");
            } else {
                alert("不及格还想要东西？");
            }
        }


    </script>
</head>

<body>

</body>

</html>